﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace GoogleMaps
{
	/// <summary>
	/// A point on the map represented by it pixel coordinates. The X coordinate increase to the 
	/// right and the Y coordinate increases downwards.
	/// </summary>
	public class GPoint
	{
		/// <summary>
		/// Converst the object to a javascript string.
		/// </summary>
		public string ToJavaScript()
		{
			return String.Format(CultureInfo.InvariantCulture, "new GPoint({0}, {1})", X.ToString(CultureInfo.InvariantCulture), Y.ToString(CultureInfo.InvariantCulture));
		}

		/// <summary>
		/// Gets or sets the X coordinate value.
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "X")]
		public int X { get; set; }

		/// <summary>
		/// Gets of sets the Y coordinate value.
		/// </summary>
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Y")]
		public int Y { get; set; }
	}
}
